#!/usr/bin/env node

const Koa = require('koa');//大写，类

const app = new Koa(),//实例化
      Router = require('koa-router'),
      bodyparser = require('koa-bodyparser'),
      tasks =require('./routes/tasks'),
      router = new Router,
      log = console.log;


app.use(bodyparser({enableTypes:['json','form','text']}))
app.use(tasks.routes());


app.listen(8080);




